<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {include file='Public:head_in' /}
</head>
<body>
<div class="panel panel-default">
    <form id="edit_form" method="post" action="{:url('admin/Menu/edit_think')}" class="form-horizontal" role="form">
        <input type="hidden" value="{$id}" name="id">
        <div class="panel-body">
            <div class="row">
                <div class="col-xs-11">
                    <div class="form-group">
                        <label class="col-xs-3 control-label">父级菜单</label>
                        <div class="col-xs-9">
                            <select name="parentid" class="form-control select">
                                <option  value="">作为父级</option>
                                {volist name='menu_list' id='v'}
                                <option {:is_selected($parentid,$v.id)} value="{$v.id}">{$v.lefthtml}{$v.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">菜单名称</label>
                        <div class="col-xs-9">
                            <input name="name" value="{$name}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">@模块/控制器/方法</label>
                        <div class="col-xs-3">
                            <input name="module" type="text" value="admin" class="form-control"/>
                        </div>
                        <div class="col-xs-3">
                            <select name="controller" class="form-control select">
                                <option {:is_selected($controller,'Default')} value="Default">Default</option>
                                {volist name='cont' id='v'}
                                <option {:is_selected($controller,basename($v['filename'],'.php'))} value="{:basename($v.filename,'.php')}">{:basename($v.filename,'.php')}</option>
                                {/volist}
                            </select>
                        </div>
                        <div class="col-xs-3">
                            <input value="{$method}" name="method" type="text" value="" class="form-control"/>
                            <span class="help-block">默认填default</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-xs-3 control-label">菜单徽标</div>
                        <div class="col-xs-9">
                            <input value="{$icon}" name="icon" type="text" class="form-control"/>
                            <span class="help-block">格式:fa fa-users</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">备注</label>
                        <div class="col-xs-9 col-xs-12">
                            <textarea name="remark" class="form-control" rows="5">{$remark}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">菜单类型</label>
                        <div class="col-xs-9">
                            <select name="type" class="form-control select">
                                <option {:is_selected($type,0)} value="0">菜单</option>
                                <option {:is_selected($type,1)} value="1">权限认证</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3  control-label">菜单状态</label>
                        <div class="col-xs-9">
                            <label class="switch">
                                <input name="status" type="checkbox" {:is_checked($status)} value="1"/>
                                <span></span>
                            </label>
                            <span class="help-block">默认正常</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel-footer">
            <button class="btn btn-info pull-right">保存修改<span class="fa fa-floppy-o fa-right"></span></button>
        </div>
    </form>
</div>
</body>
</html>